<extend name="Layout/application"/>

<block name="content">
    <div class="row">
        <div class="col-md-12">

            <div class="row">
                <div class="col-md-8">
                    <div class="page-header">
                        <h1>系统首页</h1>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-md-10">
                    <div class="panel panel-default">
                        <div class="panel-heading">系统信息</div>

                        <div class="panel-body">

                            <form class="form-horizontal" role="form" method="post" action="{{:U('System/systemchange')}}">
                                <div class="pageone">
                                    <div class="form-group">
                                        <label for="owner" class="col-sm-2 control-label">网站所有者</label>
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" name="owner" id="owner" value="{{$sys.owner}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="companyname" class="col-sm-2 control-label">公司名称</label>
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" name="companyname" id="companyname" value="{{$sys.companyname}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="netname" class="col-sm-2 control-label">网站名称</label>
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" name="netname" id="netname" value="{{$sys.netname}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="keywords" class="col-sm-2 control-label">关键词</label>
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" name="keywords" id="keywords" value="{{$sys.keywords}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="icpno" class="col-sm-2 control-label">ICP备案号</label>
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" name="icpno" id="icpno" value="{{$sys.icpno}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="copyright" class="col-sm-2 control-label">版权</label>
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" name="copyright" id="copyright" value="{{$sys.copyright}}">
                                        </div>
                                    </div>
                                </div>

                                <div class="pagetwo" style="display: none">
                                    <div class="form-group">
                                        <label for="email" class="col-sm-2 control-label">E-mail</label>
                                        <div class="col-sm-4">
                                            <input type="hidden" name="id" value="{{$sys.id}}">
                                            <input type="email" class="form-control" name="email" id="email" value="{{$sys.email}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="qq" class="col-sm-2 control-label">QQ</label>
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" name="qq" id="qq" value="{{$sys.qq}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="phoneno" class="col-sm-2 control-label">联系电话</label>
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" name="phoneno" id="phoneno" value="{{$sys.phoneno}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="fax" class="col-sm-2 control-label">传真</label>
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" name="fax" id="fax" value="{{$sys.fax}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="weibo" class="col-sm-2 control-label">微博</label>
                                        <div class="col-sm-4">
                                            <input type="text" class="form-control" name="weibo" id="weibo" value="{{$sys.weibo}}">
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-4">
                                        <button type="button" class="btn btn-primary back" disabled>后退</button>
                                        <button type="button" class="btn btn-primary prev">前进</button>
                                    </div>
                                </div>

                            </form>


                        </div>
                    </div>
                </div>


                <div class="col-md-2">
                    <div class="list-group">
                        <a href="javascript: void 0;" class="list-group-item list-group-item-info sort_category">
                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> 新增 (add)
                        </a>

                        <a href="javascript: void 0;" class="list-group-item list-group-item-info sort_category">
                            <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> 排序 (sort)
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>

<block name="js">
    <script type="text/javascript">
        $(function(){


            $(".prev").click(function () {
                if($(".prev").text()=="提交") {
                    $(".form-horizontal").submit();
                    return;
                }

                $(".pageone").hide(600);
                $(".pagetwo").show(600);
                $(".back").prop('disabled', false);
                $(".prev").text("提交");

            })


            $(".back").click(function () {
                $(".pageone").show(600);
                $(".pagetwo").hide(600);
                $(".back").prop('disabled', true);
                $(".prev").text("前进");

            })

        })
    </script>
</block>
